Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement MaxCumulativeFailsafeSeconds #19582

Conversation

tehampson
Copy link
Contributor

@tehampson tehampson commented Jun 14, 2022

Problem

Change overview

  • Added MaxCumulativeFailsafeSeconds attribute to GeneralCommissioningCluster
  • Added second timer in fail safe context to expire when

Testing

How was this tested? (at least one bullet point required)

  • No unit test added to fail safe context since there were no existing unit tests that verified expire of original timer.
  • On custom build where CHIP_DEVICE_CONFIG_MAX_CUMULATIVE_FAILSAFE_SEC 10 and CHIP_DEVICE_CONFIG_FAILSAFE_EXPIRY_LENGTH_SEC 1.
    • Ran ./chip-tool generalcommissioning arm-fail-safe 20 1 1 0 to confirm that max cumulative timer expired first triggering cleanup
    • Ran ./chip-tool generalcommissioning arm-fail-safe 9 1 1 0, then again after 6 seconds to confirm that max cumulative timer expired first triggering cleanup

@github-actions
Copy link

github-actions bot commented Jun 14, 2022

PR #19582: Size comparison from 4b6fc80 to 2906425

Increases (28 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, mbed, nrfconnect, p6, telink)
platform target config section 4b6fc80 2906425 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 659119 659239 120 0.0
.text 571760 571880 120 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 645667 645787 120 0.0
.text 555280 555400 120 0.0
lock-ftd LP_CC2652R7 (read only) 688531 688635 104 0.0
.text 589164 589268 104 0.0
lock-mtd LP_CC2652R7 (read only) 637939 638043 104 0.0
.text 538684 538788 104 0.0
pump-app LP_CC2652R7 (read only) 669747 669851 104 0.0
.text 582284 582388 104 0.0
pump-controller-app LP_CC2652R7 (read only) 660471 660599 128 0.0
.text 575084 575212 128 0.0
shell LP_CC2652R7 (read only) 689270 689398 128 0.0
.text 578832 578960 128 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 612202 612314 112 0.0
.app_xip_area 467836 467948 112 0.0
lock cyw930739m2evb_01 (read/write) 609318 609430 112 0.0
.app_xip_area 464808 464920 112 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 615382 615494 112 0.0
.app_xip_area 471928 472040 112 0.0
efr32 lighting-app BRD4161A (read only) 920584 920712 128 0.0
.text 920576 920704 128 0.0
BRD4161A+rpc (read only) 956240 956384 144 0.0
.text 956232 956376 144 0.0
BRD4161A+rs911x (read only) 795700 795844 144 0.0
.text 795692 795836 144 0.0
lock-app BRD4161A+wf200 (read only) 963596 963708 112 0.0
.text 963588 963700 112 0.0
window-app BRD4161A (read only) 905472 905600 128 0.0
.text 905464 905592 128 0.0
esp32 all-clusters-app c3devkit (read only) 1013900 1014014 114 0.0
.flash.text 1013900 1014014 114 0.0
m5stack (read only) 1068115 1068315 200 0.0
.flash.text 1062731 1062931 200 0.0
k32w light k32w061+release (read/write) 658328 658440 112 0.0
.text 580736 580848 112 0.0
lock k32w061+release (read/write) 719940 720068 128 0.0
.text 641944 642072 128 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2434816 2434944 128 0.0
.text 1397460 1397588 128 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1199111 1199223 112 0.0
text 822412 822524 112 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1144347 1144475 128 0.0
text 792752 792872 120 0.0
p6 all-clusters-app default (read/write) 2552984 2553112 128 0.0
.text 1511248 1511376 128 0.0
all-clusters-minimal-app default (read/write) 2495472 2495600 128 0.0
.text 1453736 1453864 128 0.0
light-app default (read/write) 2426848 2426976 128 0.0
.text 1385112 1385240 128 0.0
lock-app default (read/write) 2447256 2447384 128 0.0
.text 1405520 1405648 128 0.0
telink light-switch-app tlsr9518adk80d (read/write) 787840 787960 120 0.0
text 557712 557832 120 0.0
lighting-app tlsr9518adk80d (read/write) 807828 807948 120 0.0
text 574404 574522 118 0.0
Decreases (5 builds for cc13x2_26x2)
platform target config section 4b6fc80 2906425 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 191784 191664 -120 -0.1
lock-ftd LP_CC2652R7 (read/write) 153444 153340 -104 -0.1
pump-app LP_CC2652R7 (read/write) 173124 173020 -104 -0.1
pump-controller-app LP_CC2652R7 (read/write) 182520 182392 -128 -0.1
shell LP_CC2652R7 (read/write) 157128 157000 -128 -0.1
Full report (28 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, mbed, nrfconnect, p6, telink)
platform target config section 4b6fc80 2906425 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 659119 659239 120 0.0
(read/write) 191784 191664 -120 -0.1
.bss 73796 73796 0 0.0
.data 3416 3416 0 0.0
.rodata 87047 87047 0 0.0
.text 571760 571880 120 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 645667 645787 120 0.0
(read/write) 157292 157292 0 0.0
.bss 73020 73020 0 0.0
.data 3356 3356 0 0.0
.rodata 90067 90067 0 0.0
.text 555280 555400 120 0.0
lock-ftd LP_CC2652R7 (read only) 688531 688635 104 0.0
(read/write) 153444 153340 -104 -0.1
.bss 71756 71756 0 0.0
.data 3280 3280 0 0.0
.rodata 98883 98883 0 0.0
.text 589164 589268 104 0.0
lock-mtd LP_CC2652R7 (read only) 637939 638043 104 0.0
(read/write) 144888 144888 0 0.0
.bss 67492 67492 0 0.0
.data 3280 3280 0 0.0
.rodata 98763 98763 0 0.0
.text 538684 538788 104 0.0
pump-app LP_CC2652R7 (read only) 669747 669851 104 0.0
(read/write) 173124 173020 -104 -0.1
.bss 71884 71884 0 0.0
.data 3316 3316 0 0.0
.rodata 86979 86979 0 0.0
.text 582284 582388 104 0.0
pump-controller-app LP_CC2652R7 (read only) 660471 660599 128 0.0
(read/write) 182520 182392 -128 -0.1
.bss 72004 72004 0 0.0
.data 3276 3276 0 0.0
.rodata 84903 84903 0 0.0
.text 575084 575212 128 0.0
shell LP_CC2652R7 (read only) 689270 689398 128 0.0
(read/write) 157128 157000 -128 -0.1
.bss 76092 76092 0 0.0
.data 3420 3420 0 0.0
.rodata 110126 110126 0 0.0
.text 578832 578960 128 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 612202 612314 112 0.0
.app_xip_area 467836 467948 112 0.0
.bss 87288 87288 0 0.0
.data 764 764 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 609318 609430 112 0.0
.app_xip_area 464808 464920 112 0.0
.bss 87464 87464 0 0.0
.data 732 732 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 615382 615494 112 0.0
.app_xip_area 471928 472040 112 0.0
.bss 86464 86464 0 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 920584 920712 128 0.0
(read/write) 133456 133456 0 0.0
.bss 131336 131336 0 0.0
.data 2116 2116 0 0.0
.text 920576 920704 128 0.0
BRD4161A+rpc (read only) 956240 956384 144 0.0
(read/write) 150328 150328 0 0.0
.bss 148008 148008 0 0.0
.data 2320 2320 0 0.0
.text 956232 956376 144 0.0
BRD4161A+rs911x (read only) 795700 795844 144 0.0
(read/write) 129736 129736 0 0.0
.bss 127612 127612 0 0.0
.data 2124 2124 0 0.0
.text 795692 795836 144 0.0
lock-app BRD4161A+wf200 (read only) 963596 963708 112 0.0
(read/write) 130076 130076 0 0.0
.bss 127988 127988 0 0.0
.data 2088 2088 0 0.0
.text 963588 963700 112 0.0
window-app BRD4161A (read only) 905472 905600 128 0.0
(read/write) 133528 133528 0 0.0
.bss 131416 131416 0 0.0
.data 2108 2108 0 0.0
.text 905464 905592 128 0.0
esp32 all-clusters-app c3devkit (read only) 1013900 1014014 114 0.0
(read/write) 1483522 1483522 0 0.0
.dram0.bss 69424 69424 0 0.0
.dram0.data 14696 14696 0 0.0
.flash.rodata 213968 213968 0 0.0
.flash.text 1013900 1014014 114 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1068115 1068315 200 0.0
(read/write) 485616 485616 0 0.0
.dram0.bss 74952 74952 0 0.0
.dram0.data 34224 34224 0 0.0
.flash.rodata 244444 244444 0 0.0
.flash.text 1062731 1062931 200 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 658328 658440 112 0.0
.bss 69764 69764 0 0.0
.data 2028 2028 0 0.0
.text 580736 580848 112 0.0
lock k32w061+release (read/write) 719940 720068 128 0.0
.bss 70196 70196 0 0.0
.data 2000 2000 0 0.0
.text 641944 642072 128 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2434816 2434944 128 0.0
.bss 209212 209212 0 0.0
.data 5864 5864 0 0.0
.text 1397460 1397588 128 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1199111 1199223 112 0.0
bss 141633 141633 0 0.0
rodata 156128 156128 0 0.0
text 822412 822524 112 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1144347 1144475 128 0.0
bss 140824 140824 0 0.0
rodata 131860 131860 0 0.0
text 792752 792872 120 0.0
p6 all-clusters-app default (read/write) 2552984 2553112 128 0.0
.bss 143424 143424 0 0.0
.data 2832 2832 0 0.0
.text 1511248 1511376 128 0.0
all-clusters-minimal-app default (read/write) 2495472 2495600 128 0.0
.bss 142640 142640 0 0.0
.data 2776 2776 0 0.0
.text 1453736 1453864 128 0.0
light-app default (read/write) 2426848 2426976 128 0.0
.bss 135752 135752 0 0.0
.data 2624 2624 0 0.0
.text 1385112 1385240 128 0.0
lock-app default (read/write) 2447256 2447384 128 0.0
.bss 135576 135576 0 0.0
.data 2600 2600 0 0.0
.text 1405520 1405648 128 0.0
telink light-switch-app tlsr9518adk80d (read/write) 787840 787960 120 0.0
bss 70892 70892 0 0.0
noinit 40416 40416 0 0.0
text 557712 557832 120 0.0
lighting-app tlsr9518adk80d (read/write) 807828 807948 120 0.0
bss 71144 71144 0 0.0
noinit 40416 40416 0 0.0
text 574404 574522 118 0.0

@github-actions
Copy link

github-actions bot commented Jun 14, 2022

PR #19582: Size comparison from 4b6fc80 to 5f26379

Increases (28 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, mbed, nrfconnect, p6, telink)
platform target config section 4b6fc80 5f26379 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 659119 659727 608 0.1
.rodata 87047 87143 96 0.1
.text 571760 572272 512 0.1
all-clusters-minimal-app LP_CC2652R7 (read only) 645667 646291 624 0.1
.rodata 90067 90163 96 0.1
.text 555280 555808 528 0.1
lock-ftd LP_CC2652R7 (read only) 688531 688707 176 0.0
.text 589164 589340 176 0.0
lock-mtd LP_CC2652R7 (read only) 637939 638115 176 0.0
.text 538684 538860 176 0.0
pump-app LP_CC2652R7 (read only) 669747 669915 168 0.0
.text 582284 582452 168 0.0
pump-controller-app LP_CC2652R7 (read only) 660471 660671 200 0.0
.text 575084 575284 200 0.0
shell LP_CC2652R7 (read only) 689270 689870 600 0.1
.rodata 110126 110222 96 0.1
.text 578832 579336 504 0.1
cyw30739 light cyw930739m2evb_01 (read/write) 612202 612378 176 0.0
.app_xip_area 467836 468012 176 0.0
lock cyw930739m2evb_01 (read/write) 609318 609494 176 0.0
.app_xip_area 464808 464984 176 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 615382 615566 184 0.0
.app_xip_area 471928 472112 184 0.0
efr32 lighting-app BRD4161A (read only) 920584 920776 192 0.0
.text 920576 920768 192 0.0
BRD4161A+rpc (read only) 956240 956448 208 0.0
.text 956232 956440 208 0.0
BRD4161A+rs911x (read only) 795700 795908 208 0.0
.text 795692 795900 208 0.0
lock-app BRD4161A+wf200 (read only) 963596 963772 176 0.0
.text 963588 963764 176 0.0
window-app BRD4161A (read only) 905472 905664 192 0.0
.text 905464 905656 192 0.0
esp32 all-clusters-app c3devkit (read only) 1013900 1014350 450 0.0
(read/write) 1483522 1483618 96 0.0
.flash.rodata 213968 214064 96 0.0
.flash.text 1013900 1014350 450 0.0
m5stack (read only) 1068115 1068635 520 0.0
(read/write) 485616 485712 96 0.0
.flash.rodata 244444 244540 96 0.0
.flash.text 1062731 1063251 520 0.0
k32w light k32w061+release (read/write) 658328 658504 176 0.0
.text 580736 580912 176 0.0
lock k32w061+release (read/write) 719940 720132 192 0.0
.text 641944 642136 192 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2434816 2435624 808 0.0
.text 1397460 1398268 808 0.1
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1199111 1199719 608 0.1
rodata 156128 156224 96 0.1
text 822412 822928 516 0.1
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1144347 1144971 624 0.1
rodata 131860 131956 96 0.1
text 792752 793272 520 0.1
p6 all-clusters-app default (read/write) 2552984 2553672 688 0.0
.text 1511248 1511936 688 0.0
all-clusters-minimal-app default (read/write) 2495472 2496160 688 0.0
.text 1453736 1454424 688 0.0
light-app default (read/write) 2426848 2427040 192 0.0
.text 1385112 1385304 192 0.0
lock-app default (read/write) 2447256 2447448 192 0.0
.text 1405520 1405712 192 0.0
telink light-switch-app tlsr9518adk80d (read/write) 787840 788024 184 0.0
text 557712 557890 178 0.0
lighting-app tlsr9518adk80d (read/write) 807828 808004 176 0.0
text 574404 574580 176 0.0
Decreases (5 builds for cc13x2_26x2)
platform target config section 4b6fc80 5f26379 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 191784 191176 -608 -0.3
lock-ftd LP_CC2652R7 (read/write) 153444 153268 -176 -0.1
pump-app LP_CC2652R7 (read/write) 173124 172956 -168 -0.1
pump-controller-app LP_CC2652R7 (read/write) 182520 182320 -200 -0.1
shell LP_CC2652R7 (read/write) 157128 156528 -600 -0.4
Full report (28 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, mbed, nrfconnect, p6, telink)
platform target config section 4b6fc80 5f26379 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 659119 659727 608 0.1
(read/write) 191784 191176 -608 -0.3
.bss 73796 73796 0 0.0
.data 3416 3416 0 0.0
.rodata 87047 87143 96 0.1
.text 571760 572272 512 0.1
all-clusters-minimal-app LP_CC2652R7 (read only) 645667 646291 624 0.1
(read/write) 157292 157292 0 0.0
.bss 73020 73020 0 0.0
.data 3356 3356 0 0.0
.rodata 90067 90163 96 0.1
.text 555280 555808 528 0.1
lock-ftd LP_CC2652R7 (read only) 688531 688707 176 0.0
(read/write) 153444 153268 -176 -0.1
.bss 71756 71756 0 0.0
.data 3280 3280 0 0.0
.rodata 98883 98883 0 0.0
.text 589164 589340 176 0.0
lock-mtd LP_CC2652R7 (read only) 637939 638115 176 0.0
(read/write) 144888 144888 0 0.0
.bss 67492 67492 0 0.0
.data 3280 3280 0 0.0
.rodata 98763 98763 0 0.0
.text 538684 538860 176 0.0
pump-app LP_CC2652R7 (read only) 669747 669915 168 0.0
(read/write) 173124 172956 -168 -0.1
.bss 71884 71884 0 0.0
.data 3316 3316 0 0.0
.rodata 86979 86979 0 0.0
.text 582284 582452 168 0.0
pump-controller-app LP_CC2652R7 (read only) 660471 660671 200 0.0
(read/write) 182520 182320 -200 -0.1
.bss 72004 72004 0 0.0
.data 3276 3276 0 0.0
.rodata 84903 84903 0 0.0
.text 575084 575284 200 0.0
shell LP_CC2652R7 (read only) 689270 689870 600 0.1
(read/write) 157128 156528 -600 -0.4
.bss 76092 76092 0 0.0
.data 3420 3420 0 0.0
.rodata 110126 110222 96 0.1
.text 578832 579336 504 0.1
cyw30739 light cyw930739m2evb_01 (read/write) 612202 612378 176 0.0
.app_xip_area 467836 468012 176 0.0
.bss 87288 87288 0 0.0
.data 764 764 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 609318 609494 176 0.0
.app_xip_area 464808 464984 176 0.0
.bss 87464 87464 0 0.0
.data 732 732 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 615382 615566 184 0.0
.app_xip_area 471928 472112 184 0.0
.bss 86464 86464 0 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 920584 920776 192 0.0
(read/write) 133456 133456 0 0.0
.bss 131336 131336 0 0.0
.data 2116 2116 0 0.0
.text 920576 920768 192 0.0
BRD4161A+rpc (read only) 956240 956448 208 0.0
(read/write) 150328 150328 0 0.0
.bss 148008 148008 0 0.0
.data 2320 2320 0 0.0
.text 956232 956440 208 0.0
BRD4161A+rs911x (read only) 795700 795908 208 0.0
(read/write) 129736 129736 0 0.0
.bss 127612 127612 0 0.0
.data 2124 2124 0 0.0
.text 795692 795900 208 0.0
lock-app BRD4161A+wf200 (read only) 963596 963772 176 0.0
(read/write) 130076 130076 0 0.0
.bss 127988 127988 0 0.0
.data 2088 2088 0 0.0
.text 963588 963764 176 0.0
window-app BRD4161A (read only) 905472 905664 192 0.0
(read/write) 133528 133528 0 0.0
.bss 131416 131416 0 0.0
.data 2108 2108 0 0.0
.text 905464 905656 192 0.0
esp32 all-clusters-app c3devkit (read only) 1013900 1014350 450 0.0
(read/write) 1483522 1483618 96 0.0
.dram0.bss 69424 69424 0 0.0
.dram0.data 14696 14696 0 0.0
.flash.rodata 213968 214064 96 0.0
.flash.text 1013900 1014350 450 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1068115 1068635 520 0.0
(read/write) 485616 485712 96 0.0
.dram0.bss 74952 74952 0 0.0
.dram0.data 34224 34224 0 0.0
.flash.rodata 244444 244540 96 0.0
.flash.text 1062731 1063251 520 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 658328 658504 176 0.0
.bss 69764 69764 0 0.0
.data 2028 2028 0 0.0
.text 580736 580912 176 0.0
lock k32w061+release (read/write) 719940 720132 192 0.0
.bss 70196 70196 0 0.0
.data 2000 2000 0 0.0
.text 641944 642136 192 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2434816 2435624 808 0.0
.bss 209212 209212 0 0.0
.data 5864 5864 0 0.0
.text 1397460 1398268 808 0.1
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1199111 1199719 608 0.1
bss 141633 141633 0 0.0
rodata 156128 156224 96 0.1
text 822412 822928 516 0.1
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1144347 1144971 624 0.1
bss 140824 140824 0 0.0
rodata 131860 131956 96 0.1
text 792752 793272 520 0.1
p6 all-clusters-app default (read/write) 2552984 2553672 688 0.0
.bss 143424 143424 0 0.0
.data 2832 2832 0 0.0
.text 1511248 1511936 688 0.0
all-clusters-minimal-app default (read/write) 2495472 2496160 688 0.0
.bss 142640 142640 0 0.0
.data 2776 2776 0 0.0
.text 1453736 1454424 688 0.0
light-app default (read/write) 2426848 2427040 192 0.0
.bss 135752 135752 0 0.0
.data 2624 2624 0 0.0
.text 1385112 1385304 192 0.0
lock-app default (read/write) 2447256 2447448 192 0.0
.bss 135576 135576 0 0.0
.data 2600 2600 0 0.0
.text 1405520 1405712 192 0.0
telink light-switch-app tlsr9518adk80d (read/write) 787840 788024 184 0.0
bss 70892 70892 0 0.0
noinit 40416 40416 0 0.0
text 557712 557890 178 0.0
lighting-app tlsr9518adk80d (read/write) 807828 808004 176 0.0
bss 71144 71144 0 0.0
noinit 40416 40416 0 0.0
text 574404 574580 176 0.0

src/platform/FailSafeContext.cpp Outdated Show resolved Hide resolved
src/platform/FailSafeContext.cpp Outdated Show resolved Hide resolved
src/platform/FailSafeContext.cpp Show resolved Hide resolved
@tehampson tehampson merged commit a8b3a07 into project-chip:master Jun 15, 2022
@tehampson tehampson deleted the max-cumulative-failsafe-seconds-issue-19331 branch June 15, 2022 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add MaxCumulativeFailsafeSeconds attribute, and use it within GeneralCommissioningCluster
3 participants